Skip to content

Conversation

@Architector4
Copy link
Contributor

File Entity.h uses std::mutex but never actually does #include <mutex>.

As far as I can tell, it just happened by chance that:

  • # include <bits/std_mutex.h> is written in file /usr/include/c++/15.2.1/bits/atomic_wait.h from the GNU C++ library implementation
  • Which is included by /usr/include/c++/15.2.1/bits/atomic_base.h
  • Which is included by /usr/include/c++/15.2.1/bits/shared_ptr_atomic.h
  • Which is included by /usr/include/c++/15.2.1/memory
  • Which is included as <memory> by Source/System/Reader.h
  • Which is included by Source/System/Serializable.h
  • Which is included by Source/System/Entity.h

...But of course, I assume GNU C++ library is not used by Microsoft's compiler, and files that they do have likely don't end up including mutex.

So, just, include the mutex where it's used.

@Architector4
Copy link
Contributor Author

Architector4 commented Nov 5, 2025

FAILED: [code=2] Cortex Command.exe.p/Source_Managers_GLResourceMan.cpp.obj 
[435](https://github.com/cortex-command-community/Cortex-Command-Community-Project/actions/runs/19113575714/job/54616676720?pr=233#step:6:436)
"cl" "-ICortex Command.exe.p" "-I." "-I.." "-ISource" "-I..\Source" "-ISource\Activities" "-I..\Source\Activities" "-ISource\Entities" "-I..\Source\Entities" "-ISource\GUI" "-I..\Source\GUI" "-I..\Source\GUI\Wrappers" "-ISource\Lua" "-I..\Source\Lua" "-ISource\Managers" "-I..\Source\Managers" "-ISource\Menus" "-I..\Source\Menus" "-ISource\Renderer" "-I..\Source\Renderer" "-ISource\System" "-I..\Source\System" "-ISource\GUI\imgui" "-I..\Source\GUI\imgui" "-I..\Source\GUI\imgui\backends" "-IResources" "-I..\Resources" "-I..\external\include\boost_1_75" "-I..\external\include\fmod-2.2.13" "-I..\external\include\glad-2.0.0-beta" "-I..\external\include\glm-0.9.9.8" "-I..\external\include\thread-pool-3.5.0\include" "-I..\external\include\hopscotch-map-2.3.1\include" "-I..\external\include\LZ4-1.9.3\LZ4" "-Iexternal\sources\LuaJIT-2.1\src" "-I..\external\sources\LuaJIT-2.1\src" "-I..\external\sources\zlib-ng-2.1.3\include" "-I..\external\sources\minizip-ng-4.0.0\include" "-I..\external\sources\minizip-ng-4.0.0\src" 
[436](https://github.com/cortex-command-community/Cortex-Command-Community-Project/actions/runs/19113575714/job/54616676720?pr=233#step:6:437)
..\Source\Renderer\Shader.h(211): error C2079: 'RTE::Shader::m_Locations' uses undefined class 'std::array<int,26>'

what

ok give me a minute ok

@Architector4
Copy link
Contributor Author

Oh, understandable.

  • There's an # include <array> in /usr/include/c++/15.2.1/functional
  • Which is included in Source/System/Reader.h
  • Which is included in Source/System/Serializable.h
  • Which is included in Source/System/Entity.h
  • Which is included in Source/Renderer/Shader.h

HECK!

@Architector4
Copy link
Contributor Author

$ grep -L "#include <array>" $(grep -lr "std::array" Source)
Source/Entities/TerrainObject.cpp
Source/Entities/Actor.h
Source/Entities/PieMenu.cpp
Source/Managers/PresetMan.cpp
Source/Managers/ActivityMan.cpp
Source/Managers/AudioMan.cpp
Source/Managers/FrameMan.cpp
Source/Managers/LuaMan.h
Source/Managers/PerformanceMan.cpp
Source/Managers/PostProcessMan.cpp
Source/Managers/UInputMan.cpp
Source/Menus/MainMenuGUI.h
Source/Menus/SettingsInputMappingGUI.cpp
Source/System/PieQuadrant.cpp
Source/System/ContentFile.cpp
Source/System/Controller.cpp
Source/System/PathFinder.cpp
Source/System/PathFinder.h
Source/System/SpatialPartitionGrid.h
Source/Renderer/GraphicalPrimitive.cpp
Source/Renderer/Shader.h

guhhhhhhhhhhhhhhhhhhhhhhhh this needs more effort i guess

@Architector4
Copy link
Contributor Author

Architector4 commented Nov 5, 2025

ALL GREEN MOTHERFUCKER ✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅

edit: sorry, got carried away

all green though

✅✅✅✅

@Architector4 Architector4 changed the title Entity.h - include Mutex; fix CI output for Windows fix CI for Windows Nov 5, 2025
Copy link
Contributor

@HeliumAnt HeliumAnt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Funky, usually it's the linux that finds these things. Good catch!

@Causeless
Copy link
Contributor

@Causeless Causeless merged commit 230d38b into cortex-command-community:development Nov 14, 2025
4 checks passed
@Architector4 Architector4 deleted the patch-8 branch November 14, 2025 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants